<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="Definitions_1" targetNamespace="http://camunda.org/schema/1.0/bpmn">
  <bpmn2:process id="terminateEndEventExample" name="Default Process" isExecutable="true">
    <bpmn2:startEvent id="start">
      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:parallelGateway id="ParallelGateway_1">
      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
    </bpmn2:parallelGateway>
    <bpmn2:sequenceFlow id="SequenceFlow_2" sourceRef="start" targetRef="ParallelGateway_1"/>
    <bpmn2:userTask id="preTerminateTask" name="check before termination">
      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:sequenceFlow id="SequenceFlow_4" sourceRef="ParallelGateway_1" targetRef="preTerminateTask"/>
    <bpmn2:endEvent id="EndEvent_2">
      <bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
      <bpmn2:terminateEventDefinition id="TerminateEventDefinition_1"/>
    </bpmn2:endEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_5" sourceRef="preTerminateTask" targetRef="EndEvent_2"/>
    <bpmn2:userTask id="preNormalTerminateTask" name="check before end">
      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
    </bpmn2:userTask>
    <bpmn2:sequenceFlow id="SequenceFlow_1" sourceRef="ParallelGateway_1" targetRef="preNormalTerminateTask"/>
    <bpmn2:endEvent id="EndEvent_1">
      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_3" sourceRef="preNormalTerminateTask" targetRef="EndEvent_1"/>
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Default Process Diagram">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process_1">
      <bpmndi:BPMNShape id="BPMNShape_1" bpmnElement="start">
        <dc:Bounds height="36.0" width="36.0" x="110.0" y="198.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_ParallelGateway_1" bpmnElement="ParallelGateway_1">
        <dc:Bounds height="50.0" width="50.0" x="196.0" y="191.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_1" targetElement="BPMNShape_ParallelGateway_1">
        <di:waypoint xsi:type="dc:Point" x="146.0" y="216.0"/>
        <di:waypoint xsi:type="dc:Point" x="196.0" y="216.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_UserTask_1" bpmnElement="preTerminateTask">
        <dc:Bounds height="50.0" width="110.0" x="275.0" y="268.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_ParallelGateway_1" targetElement="BPMNShape_UserTask_1">
        <di:waypoint xsi:type="dc:Point" x="221.0" y="242.0"/>
        <di:waypoint xsi:type="dc:Point" x="221.0" y="292.0"/>
        <di:waypoint xsi:type="dc:Point" x="275.0" y="293.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_EndEvent_1" bpmnElement="EndEvent_2">
        <dc:Bounds height="36.0" width="36.0" x="475.0" y="275.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="BPMNShape_UserTask_1" targetElement="BPMNShape_EndEvent_1">
        <di:waypoint xsi:type="dc:Point" x="385.0" y="293.0"/>
        <di:waypoint xsi:type="dc:Point" x="475.0" y="293.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_UserTask_2" bpmnElement="preNormalTerminateTask">
        <dc:Bounds height="50.0" width="110.0" x="275.0" y="142.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_ParallelGateway_1" targetElement="BPMNShape_UserTask_2">
        <di:waypoint xsi:type="dc:Point" x="221.0" y="191.0"/>
        <di:waypoint xsi:type="dc:Point" x="221.0" y="167.0"/>
        <di:waypoint xsi:type="dc:Point" x="275.0" y="167.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_EndEvent_2" bpmnElement="EndEvent_1">
        <dc:Bounds height="36.0" width="36.0" x="475.0" y="150.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="BPMNShape_UserTask_2" targetElement="BPMNShape_EndEvent_2">
        <di:waypoint xsi:type="dc:Point" x="385.0" y="167.0"/>
        <di:waypoint xsi:type="dc:Point" x="475.0" y="168.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>